package com.lechuang.member.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lechuang.member.entity.MemberSummary;
import com.lechuang.member.service.MemberSummaryService;
import com.lechuang.member.mapper.MemberSummaryMapper;
import com.lechuang.web.exception.BusinessException;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
* @author apple
* @description 针对表【member_summary(会员数据统计表)】的数据库操作Service实现
* @createDate 2024-06-22 10:46:16
*/
@Service
public class MemberSummaryServiceImpl extends ServiceImpl<MemberSummaryMapper, MemberSummary>
    implements MemberSummaryService{

    @Override
    public MemberSummary queryByMemberId(Long memberId) {
        LambdaQueryWrapper<MemberSummary> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(MemberSummary::getMemberId,memberId);
        MemberSummary summary = this.getOne(queryWrapper);
        return summary;
    }
}




